package org.oos.dao.impl;

import java.io.File;

import org.oos.atom.AtomEntity;
import org.oos.atom.impl.AtomFeed;
import org.oos.dao.exceptions.CreationException;
import org.oos.dao.exceptions.DeleteException;
import org.oos.dao.exceptions.UpdateException;

/**
 * 
 * Extensión of {@link AbstractDao} to set edit methods as unssuported.
 * 
 * @author pablo.gonzalez@11870.com
 * 
 * @param <Feed>
 * @param <Entry>
 */
abstract class ReadOnlyAbstractDao<Entry extends AtomEntity, Feed extends AtomFeed<Entry>>
		extends AbstractDao<Entry, Feed> {

	ReadOnlyAbstractDao(Class<?> feedType, Class<?> entityType) {
		super(feedType, entityType);
	}

	public Entry create(Entry entry) throws CreationException {
		throw new UnsupportedOperationException();
	}

	public Entry createMedia(File file, String contentType) throws CreationException {
		throw new UnsupportedOperationException();
	}

	public boolean delete(Entry entry) throws DeleteException {
		throw new UnsupportedOperationException();
	}

	public boolean deleteMedia(Entry entry) throws DeleteException {
		throw new UnsupportedOperationException();
	}
	
	public boolean update(Entry entry) throws UpdateException {
		throw new UnsupportedOperationException();
	}

	public boolean updateMedia(Entry entry, File file, String contentType) throws UpdateException {
		throw new UnsupportedOperationException();
	}
}
